import Vue from 'vue'
import App from './App.vue'
import router from './router'
// 适配插件
import 'lib-flexible/flexible.js'
// 整合Elementui
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from 'axios'
import store from './store'
import VCharts from 'v-charts'
// mintui
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.use(MintUI)

// 配置请求的跟路径
// axios.defaults.baseURL = 'http://localhost:3000'
// 在 request 拦截器中，展示进度条 NProgress.start()
axios.interceptors.request.use(config => {
    console.log(config)
    config.headers.Authorization = window.sessionStorage.getItem('token')
        // 在最后必须 return config
    return config
})

Vue.prototype.$http = axios;
Vue.use(VCharts);
Vue.use(ElementUI);

Vue.config.productionTip = false

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')